<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>login-wb</title>
    <link rel="stylesheet" href="/act/all/cdn/css/1.0/reset.min.css">
    <style>
        #LoginForm { width: 480px; height: 340px;border: 1px solid #000;text-align: center; padding: 20px;background: #fff; box-sizing: border-box; }
        #LoginForm > div { margin: 20px }
    </style>
</head>
<body>
<form id="LoginForm" action="#" method="get" target="_parent">
    <div class="account">
        <label for="InputAccount">用户名: </label>
        <input type="text" id="InputAccount" name="userName"/>
        <input type="text" id="InputUrl" hidden name="callback"/>
    </div>
    <div class="password">
        <label for="InputPwd">密码: </label>
        <input type="text" id="InputPwd" name="userPwd" />
    </div>
    <div class="btn">
        <input type="submit" value="登录">
    </div>
</form>
</body>
<script src="/act/all/cdn/jquery/3.4.1/jquery.min.js"></script>
<script>
    function getQueryString(name, url) {
        var reg = new RegExp('(^|&)'+ name +'=([^&]*)(&|$)');
        var r = url.match(reg);
        if(r!=null)return  unescape(r[2]); return null;
    }
    var key = 's'
        , actionUrl = getQueryString(key, window.location.search.substr(1))
        , isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
        , callbackUrl = getQueryString('callback', actionUrl.split('?')[1]);
    if(actionUrl) {
        $('#InputUrl').val(callbackUrl);
        $('#LoginForm').attr('action', actionUrl).width(isMobile ? 325 : 400);
    }else {
        // alert('请填写' + key + '参数');
        parent.location.reload();
    }
</script>
</html>